package com.eduran.test.main;

import com.eduran.test.model.logger.Logger_021;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App_021 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans_021.xml");

        Logger_021 logger = (Logger_021)context.getBean("logger");

        logger.writeConsole("Hello there");
        logger.writeFile("Hi again");

        ((ClassPathXmlApplicationContext) context).close();
    }
}
